enum TroopTypes {
    SamuraiSwordman,
    Ronin,
    AshiguruSpearman,
    Diaymo,
    AshiguruMusketman,
    SamuraiBowman
}

class Troop {
    private _attackValue: number;
    private _isRange: bool;
    private _troopType: TroopTypes;
    private _isSamurai: bool;
    private _isAshiguru: bool;
    private _isRonin: bool;

    constructor (troopType: TroopTypes) {
        this._troopType = troopType;

        this._isSamurai = false;
        this._isAshiguru = false;
        this._isRange = false;

        switch (troopType) {
            case TroopTypes.SamuraiSwordman:            
                this._isRange = false;
                this._attackValue = 5;
                this._isSamurai = true;
                break;
            case TroopTypes.Ronin:
                this._isRange = false;
                this._attackValue = 5; 
                this._isRonin = true;
                break;
            case TroopTypes.AshiguruSpearman:
                this._isRange = false;
                this._attackValue = 4;
                this._isAshiguru = true;
                break;
            case TroopTypes.Diaymo:
                this._isRange = false;
                this._attackValue = 6;                
                break;
            case TroopTypes.AshiguruMusketman:
                this._isRange = true;
                this._attackValue = 4;
                this._isAshiguru = true;
                break;
            case TroopTypes.SamuraiBowman:
                this._isRange = true;
                this._attackValue = 6;
                this._isSamurai = true;
                break;
        }        
    }

    get IsRange() { return this._isRange; }

    get TroopType() { return this._troopType; }

    get AttackValue() { return this._attackValue; }

    get IsSamurai() { return this._isSamurai; }

    get IsAshiguru() { return this._isAshiguru; }
}

